<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<%
		String rootPath = request.getScheme() + "://"
				+ request.getServerName() + ":" + request.getServerPort();
	%>
	<head>
		<base target="_self" />
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<title>添加新闻</title>
		<style>
</style>
		<script>
function add_html()
{
window.alert(ifm1.document.all("str_test").value);

var ofrm1 = document.getElementById("ifm1").document;
 if (ofrm1==undefined) 
 {
 	 ofrm1 = document.getElementById("ifm1").contentWindow.document;  
     var ff = ofrm1.getElementById("str_test").value;  
     alert("firefox/chrome取值结果为:" + ff);  
 	
 } else 

    {  
       var ie = document.frames["ifm1"].document.getElementById("str_test").value;  
       alert("ie取值结果为:" + ie);  

   }   
	var obj=window.confirm("是否要添加本条消息?");
	if(obj==true)
	{
		window.alert("添加新闻");
		document.getElementById("form1").submit();
		window.alert("数据已经提交");
		//window.close();
		}
}
    function dyniframesize(down) { 
var pTar = null; 
if (document.getElementById){ 
pTar = document.getElementById(down); 
} 
else{ 
eval('pTar = ' + down + ';'); 
} 
if (pTar && !window.opera){ 
//begin resizing iframe 
pTar.style.display="block" 
if (pTar.contentDocument && pTar.contentDocument.body.offsetHeight){ 
//ns6 syntax 
pTar.height = pTar.contentDocument.body.offsetHeight +20; 
pTar.width = pTar.contentDocument.body.scrollWidth+20; 
} 
else if (pTar.Document && pTar.Document.body.scrollHeight){ 
//ie5+ syntax 
pTar.height = pTar.Document.body.scrollHeight; 
pTar.width = pTar.Document.body.scrollWidth; 
} 
} 
} 
function format_body()
{
dyniframesize('ifm1');
}

</script>

	</head>
	<body onload="format_body()">
	
	
			<table width="100%" border="0" cellpadding="5" cellspacing="1"
				bgcolor="#E6E6E6">
				<tr>
					<td height="600" align="right" valign="top" bgcolor="#FFFFFF">
					<iframe id="ifm1" frameborder="0" marginheight="0" marginwidth="0"
							scrolling="auto" name="ifm1" width="100%"
							src="<%=rootPath + "/kindedit/jsp/ocean_demo.jsp"%>"></iframe>
					</td>
				</tr>
			</table>
		
	</body>
</html>
